package com.danico.danicoproject.skills;

import com.badlogic.gdx.graphics.g2d.ParticleEffect;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;

public class Spell {
	
	protected int damage;
	public int getDamage(){return damage;}
	protected String type;
	protected Vector2 position, direction, destination;
	public float getX(){return position.x;}
	public float getY(){return position.y;}
	protected float speed;
	protected ParticleEffect particle;
	protected Rectangle hitbox = new Rectangle (0,0,5,5);
	public Rectangle getHitbox(){return hitbox;}
	
	public void update(float delta){
		
		if (type.equals("ball")){
			
			position.x += direction.x * speed * delta;
			position.y += direction.y * speed * delta;
		}
		particle.setPosition(position.x, position.y);
		hitbox.setX(position.x-5);
		hitbox.setY(position.y-5);
	}
	
	public void draw(SpriteBatch batch, float delta){
		
		
		particle.draw(batch, delta/100);
	}
}
